Performing object detection operations via random forest classifier

ABSTRACT

In one embodiment of the present invention, a graphics processing unit (GPU) is configured to detect an object in an image using a random forest classifier that includes multiple, identically structured decision trees. Notably, the application of each of the decision trees is independent of the application of the other decision trees. In operation, the GPU partitions the image into subsets of pixels, and associates an execution thread with each of the pixels in the subset of pixels. The GPU then causes each of the execution threads to apply the random forest classifier to the associated pixel, thereby determining a likelihood that the pixel corresponds to the object. Advantageously, such a distributed approach to object detection more fully leverages the parallel architecture of the PPU than conventional approaches. In particular, the PPU performs object detection more efficiently using the random forest classifier than using a cascaded classifier.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the priority benefit of the U.S. ProvisionalPatent Application having Ser. No. 61/794,702, filed on Mar. 15, 2013.The subject matter of this related application is hereby incorporatedherein by reference.

BACKGROUND OF THE INVENTION

Field of the Invention

Embodiments of the present invention relate generally to computergraphics and, more specifically, to performing object detectionoperations via a graphics processing unit (GPU).

Description of the Related Art

Automated real-time detection of objects (e.g., faces, pets, logos,pedestrians, etc.) in images is a well-known mid-level operation incomputer vision that is the enabler for many higher level computervision operations. For instance, object detection is a precursor totracking, scene understanding and interpretation, content based imageretrieval, etc. Many computer systems configured to implementconventional object detection rely on a central processing unit (CPU).To detect whether a particular object is included in an image, the CPUtypically performs two general steps. First, in a training step, the CPUuses “positive” images of the object and “negative” images ofnon-objects to train a statistical pattern classifier. Second, in anexecution step, the CPU applies the trained pattern classifier to eachpixel of an input image to determine whether a window (i.e., region)surrounding the pixel corresponds to the object. Further, to find theobject at multiple scales, the CPU scales the input image to differentsizes and applies the pattern classifier to each scaled image.Consequently, the CPU performs the same set of object-detectionoperations on a very large number of pixels across multiple scaledimages.

To optimize the performance of object detection, many CPUs areconfigured to implement an algorithm known as a cascaded adaptiveboosting classifier algorithm (CABCA). In the CABCA approach, a cascadedclassifier includes a series of smaller classifiers, often ofsequentially increasing complexity, that the CPU applies to each pixelin a series of discrete stages. At each stage, if the CPU determinesthat a particular pixel does not correspond to the object, then the CPUstops processing the pixel and begins processing the next pixel. As aresult of “early terminations,” the number of smaller classifiers thatthe CPU applies to each pixel is reduced for pixels that are notassociated with the object.

Increasingly, advanced computer systems include one or more graphicsprocessing units (GPUs), capable of very high performance using arelatively large number of small, parallel execution threads ondedicated programmable hardware processing units. The specialized designof such parallel processing subsystems usually allows these subsystemsto efficiently perform certain tasks using a high volume of concurrentcomputational and memory operations. Because object detection involvesperforming a high volume of object-detection operations that may beexecuted concurrently across pixels and images, many advanced computersystems leverage the GPU to perform these operations. However, due tothe sequential nature of the cascaded classifier and the differingnumber of classifiers applied to each pixel, the CABCA approach toobject detection does not fully leverage the processing capabilities ofGPUs.

For example, suppose that a first pixel of an image were associated withthe object, but the second pixel of the image were not associated withthe object. Further, suppose that the GPU were to process the imageusing a cascaded classifier that included 16 smaller classifiers.Finally, suppose that a first processing unit within the GPU were todetermine that the first pixel was not associated with the object basedon the first smaller classifier. In such a scenario, the firstprocessing unit would cease processing the first pixel and,consequently, would be idle until the processing unit assigned to thesecond pixel applied the 15 remaining smaller classifiers included inthe cascaded classifier to the second pixel. Since the number ofprocessing units included in the GPU is limited, idle processing unitsreduce the efficiency of the GPU and limit the speed at which thecomputer system performs object detection.

Accordingly, what is needed in the art is a more effective technique forperforming object detection operations via parallel processingarchitectures.

SUMMARY OF THE INVENTION

One embodiment of the present invention sets forth acomputer-implemented method for identifying an object in one or moreimages. The method includes selecting a first subset of pixels includedin a first image, associating a first execution thread with a firstpixel included in the first subset of pixels, and causing the firstexecution thread to apply a first decision tree included in a set ofmultiple decision trees to the first pixel to determine a firstlikelihood that the first pixel is associated with a first object andthereby indicating a first probability that the first object is includedin the first image, where the set of multiple decision trees is a randomforest classifier.

One advantage of the disclosed approach is that the uniform structure ofthe random forest classifier is amenable to the parallel architectureimplemented by many parallel processing units, such as graphicsprocessing units. In particular, parallel processing units may apply therandom forest classifier to multiple pixels concurrently—performingequivalent mathematical operations on each pixel. Thus, such an approachleverages the ability of a parallel processing system to efficientlyperform the same instruction on multiple pixels. By contrast, theserialization and non-uniformity inherent in conventional objectdetection reduces the efficiency of parallel processing systems.Consequently, performing object detection using a random forestclassifier is more effective than conventional object detectionapproaches.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the presentinvention can be understood in detail, a more particular description ofthe invention, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 is a block diagram illustrating a computer system configured toimplement one or more aspects of the present invention;

FIG. 2 is a block diagram of a parallel processing unit included in theparallel processing subsystem of FIG. 1, according to one embodiment ofthe present invention;

FIG. 3 is a block diagram of a general processing cluster included inthe parallel processing unit of FIG. 2, according to one embodiment ofthe present invention;

FIG. 4 is a conceptual diagram illustrating how a multi-block localbinary pattern feature may be computed, according to one embodiment ofthe present invention;

FIG. 5 is a conceptual diagram illustrating how a random forestclassifier may be trained, according to one embodiment of the presentinvention;

FIG. 6 is a conceptual diagram of an image pyramid, according to oneembodiment of the present invention;

FIGS. 7A-7B set forth a flow diagram of method steps for training arandom forest classifier, according to one embodiment of the presentinvention; and

FIGS. 8A-8B set forth a flow diagram of method steps for performingobject detection operations via a parallel processing architecture,according to one embodiment of the present invention.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forth toprovide a more thorough understanding of the present invention. However,it will be apparent to one of skill in the art that the presentinvention may be practiced without one or more of these specificdetails.

System Overview

FIG. 1 is a block diagram illustrating a computer system 100 configuredto implement one or more aspects of the present invention. As shown,computer system 100 includes, without limitation, a central processingunit (CPU) 102 and a system memory 104 coupled to a parallel processingsubsystem 112 via a memory bridge 105 and a communication path 113.Memory bridge 105 is further coupled to an I/O (input/output) bridge 107via a communication path 106, and I/O bridge 107 is, in turn, coupled toa switch 116.

In operation, I/O bridge 107 is configured to receive user inputinformation from input devices 108 (e.g., a keyboard, a mouse, avideo/image capture device, etc.) and forward the input information toCPU 102 for processing via communication path 106 and memory bridge 105.In some embodiments, the input information is a live feed from acamera/image capture device or video data stored on a digital storagemedia on which object detection operations execute. Switch 116 isconfigured to provide connections between I/O bridge 107 and othercomponents of the computer system 100, such as a network adapter 118 andvarious add-in cards 120 and 121.

As also shown, I/O bridge 107 is coupled to a system disk 114 that maybe configured to store content and applications and data for use by CPU102 and parallel processing subsystem 112. As a general matter, systemdisk 114 provides non-volatile storage for applications and data and mayinclude fixed or removable hard disk drives, flash memory devices, andCD-ROM (compact disc read-only-memory), DVD-ROM (digital versatiledisc-ROM), Blu-ray, HD-DVD (high definition DVD), or other magnetic,optical, or solid state storage devices. Finally, although notexplicitly shown, other components, such as universal serial bus orother port connections, compact disc drives, digital versatile discdrives, film recording devices, and the like, may be connected to I/Obridge 107 as well.

In various embodiments, memory bridge 105 may be a Northbridge chip, andI/O bridge 107 may be a Southbrige chip. In addition, communicationpaths 106 and 113, as well as other communication paths within computersystem 100, may be implemented using any technically suitable protocols,including, without limitation, AGP (Accelerated Graphics Port),HyperTransport, or any other bus or point-to-point communicationprotocol known in the art.

In some embodiments, parallel processing subsystem 112 comprises agraphics subsystem that delivers pixels to a display device 110 that maybe any conventional cathode ray tube, liquid crystal display,light-emitting diode display, or the like. In such embodiments, theparallel processing subsystem 112 incorporates circuitry optimized forgraphics and video processing, including, for example, video outputcircuitry. As described in greater detail below in FIG. 2, suchcircuitry may be incorporated across one or more parallel processingunits (PPUs) included within parallel processing subsystem 112. In otherembodiments, the parallel processing subsystem 112 incorporatescircuitry optimized for general purpose and/or compute processing.Again, such circuitry may be incorporated across one or more PPUsincluded within parallel processing subsystem 112 that are configured toperform such general purpose and/or compute operations. In yet otherembodiments, the one or more PPUs included within parallel processingsubsystem 112 may be configured to perform graphics processing, generalpurpose processing, and compute processing operations. System memory 104includes at least one device driver 103 configured to manage theprocessing operations of the one or more PPUs within parallel processingsubsystem 112. The system memory 104 also includes a softwareapplication 125 that executes on the CPU 102 and may issue commands thatcontrol the operation of the PPUs.

In various embodiments, parallel processing subsystem 112 may beintegrated with one or more other the other elements of FIG. 1 to form asingle system. For example, parallel processing subsystem 112 may beintegrated with CPU 102 and other connection circuitry on a single chipto form a system on chip (SoC).

It will be appreciated that the system shown herein is illustrative andthat variations and modifications are possible. The connection topology,including the number and arrangement of bridges, the number of CPUs 102,and the number of parallel processing subsystems 112, may be modified asdesired. For example, in some embodiments, system memory 104 could beconnected to CPU 102 directly rather than through memory bridge 105, andother devices would communicate with system memory 104 via memory bridge105 and CPU 102. In other alternative topologies, parallel processingsubsystem 112 may be connected to I/O bridge 107 or directly to CPU 102,rather than to memory bridge 105. In still other embodiments, I/O bridge107 and memory bridge 105 may be integrated into a single chip insteadof existing as one or more discrete devices. Lastly, in certainembodiments, one or more components shown in FIG. 1 may not be present.For example, switch 116 could be eliminated, and network adapter 118 andadd-in cards 120, 121 would connect directly to I/O bridge 107.

FIG. 2 is a block diagram of a parallel processing unit (PPU) 202included in the parallel processing subsystem 112 of FIG. 1, accordingto one embodiment of the present invention. Although FIG. 2 depicts onePPU 202, as indicated above, parallel processing subsystem 112 mayinclude any number of PPUs 202. As shown, PPU 202 is coupled to a localparallel processing (PP) memory 204. PPU 202 and PP memory 204 may beimplemented using one or more integrated circuit devices, such asprogrammable processors, application specific integrated circuits(ASICs), or memory devices, or in any other technically feasiblefashion.

In some embodiments, PPU 202 comprises a graphics processing unit (GPU)that may be configured to implement a graphics rendering pipeline toperform various operations related to generating pixel data based ongraphics data supplied by CPU 102 and/or system memory 104. Whenprocessing graphics data, PP memory 204 can be used as graphics memorythat stores one or more conventional frame buffers and, if needed, oneor more other render targets as well. Among other things, PP memory 204may be used to store and update pixel data and deliver final pixel dataor display frames to display device 110 for display. In someembodiments, PPU 202 also may be configured for general-purposeprocessing and compute operations.

In operation, CPU 102 is the master processor of computer system 100,controlling and coordinating operations of other system components. Inparticular, CPU 102 issues commands that control the operation of PPU202. In some embodiments, CPU 102 writes a stream of commands for PPU202 to a data structure (not explicitly shown in either FIG. 1 or FIG.2) that may be located in system memory 104, PP memory 204, or anotherstorage location accessible to both CPU 102 and PPU 202. A pointer tothe data structure is written to a pushbuffer to initiate processing ofthe stream of commands in the data structure. The PPU 202 reads commandstreams from the pushbuffer and then executes commands asynchronouslyrelative to the operation of CPU 102. In embodiments where multiplepushbuffers are generated, execution priorities may be specified foreach pushbuffer by an application program via device driver 103 tocontrol scheduling of the different pushbuffers.

As also shown, PPU 202 includes an I/O (input/output) unit 205 thatcommunicates with the rest of computer system 100 via the communicationpath 113 and memory bridge 105. I/O unit 205 generates packets (or othersignals) for transmission on communication path 113 and also receivesall incoming packets (or other signals) from communication path 113,directing the incoming packets to appropriate components of PPU 202. Forexample, commands related to processing tasks may be directed to a hostinterface 206, while commands related to memory operations (e.g.,reading from or writing to PP memory 204) may be directed to a crossbarunit 210. Host interface 206 reads each pushbuffer and transmits thecommand stream stored in the pushbuffer to a front end 212.

As mentioned above in conjunction with FIG. 1, the connection of PPU 202to the rest of computer system 100 may be varied. In some embodiments,parallel processing subsystem 112, which includes at least one PPU 202,is implemented as an add-in card that can be inserted into an expansionslot of computer system 100. In other embodiments, PPU 202 can beintegrated on a single chip with a bus bridge, such as memory bridge 105or I/O bridge 107. Again, in still other embodiments, some or all of theelements of PPU 202 may be included along with CPU 102 in a singleintegrated circuit or system of chip (SoC).

In operation, front end 212 transmits processing tasks received fromhost interface 206 to a work distribution unit (not shown) withintask/work unit 207. The work distribution unit receives pointers toprocessing tasks that are encoded as task metadata (TMD) and stored inmemory. The pointers to TMDs are included in a command stream that isstored as a pushbuffer and received by the front end unit 212 from thehost interface 206. Processing tasks that may be encoded as TMDs includeindices associated with the data to be processed as well as stateparameters and commands that define how the data is to be processed. Forexample, the state parameters and commands could define the program tobe executed on the data. The task/work unit 207 receives tasks from thefront end 212 and ensures that GPCs 208 are configured to a valid statebefore the processing task specified by each one of the TMDs isinitiated. A priority may be specified for each TMD that is used toschedule the execution of the processing task. Processing tasks also maybe received from the processing cluster array 230. Optionally, the TMDmay include a parameter that controls whether the TMD is added to thehead or the tail of a list of processing tasks (or to a list of pointersto the processing tasks), thereby providing another level of controlover execution priority.

PPU 202 advantageously implements a highly parallel processingarchitecture based on a processing cluster array 230 that includes a setof C general processing clusters (GPCs) 208, where C≧1. Each GPC 208 iscapable of executing a large number (e.g., hundreds or thousands) ofthreads concurrently, where each thread is an instance of a program. Invarious applications, different GPCs 208 may be allocated for processingdifferent types of programs or for performing different types ofcomputations. The allocation of GPCs 208 may vary depending on theworkload arising for each type of program or computation.

Memory interface 214 includes a set of D partition units 215, where D≧1.Each partition unit 215 is coupled to one or more dynamic random accessmemories (DRAMs) 220 residing within PPM memory 204. In one embodiment,the number of partition units 215 equals the number of DRAMs 220, andeach partition unit 215 is coupled to a different DRAM 220. In otherembodiments, the number of partition units 215 may be different than thenumber of DRAMs 220. Persons of ordinary skill in the art willappreciate that a DRAM 220 may be replaced with any other technicallysuitable storage device. In operation, various render targets, such astexture maps and frame buffers, may be stored across DRAMs 220, allowingpartition units 215 to write portions of each render target in parallelto efficiently use the available bandwidth of PP memory 204.

A given GPCs 208 may process data to be written to any of the DRAMs 220within PP memory 204. Crossbar unit 210 is configured to route theoutput of each GPC 208 to the input of any partition unit 215 or to anyother GPC 208 for further processing. GPCs 208 communicate with memoryinterface 214 via crossbar unit 210 to read from or write to variousDRAMs 220. In one embodiment, crossbar unit 210 has a connection to I/Ounit 205, in addition to a connection to PP memory 204 via memoryinterface 214, thereby enabling the processing cores within thedifferent GPCs 208 to communicate with system memory 104 or other memorynot local to PPU 202. In the embodiment of FIG. 2, crossbar unit 210 isdirectly connected with I/O unit 205. In various embodiments, crossbarunit 210 may use virtual channels to separate traffic streams betweenthe GPCs 208 and partition units 215.

Again, GPCs 208 can be programmed to execute processing tasks relatingto a wide variety of applications, including, without limitation, linearand nonlinear data transforms, filtering of video and/or audio data,modeling operations (e.g., applying laws of physics to determineposition, velocity and other attributes of objects), image renderingoperations (e.g., tessellation shader, vertex shader, geometry shader,and/or pixel/fragment shader programs), general compute operations, etc.In operation, PPU 202 is configured to transfer data from system memory104 and/or PP memory 204 to one or more on-chip memory units, processthe data, and write result data back to system memory 104 and/or PPmemory 204. The result data may then be accessed by other systemcomponents, including CPU 102, another PPU 202 within parallelprocessing subsystem 112, or another parallel processing subsystem 112within computer system 100.

As noted above, any number of PPUs 202 may be included in a parallelprocessing subsystem 112. For example, multiple PPUs 202 may be providedon a single add-in card, or multiple add-in cards may be connected tocommunication path 113, or one or more of PPUs 202 may be integratedinto a bridge chip. PPUs 202 in a multi-PPU system may be identical toor different from one another. For example, different PPUs 202 mighthave different numbers of processing cores and/or different amounts ofPP memory 204. In implementations where multiple PPUs 202 are present,those PPUs may be operated in parallel to process data at a higherthroughput than is possible with a single PPU 202. Systems incorporatingone or more PPUs 202 may be implemented in a variety of configurationsand form factors, including, without limitation, desktops, laptops,handheld personal computers or other handheld devices, servers,workstations, game consoles, embedded systems, and the like.

FIG. 3 is a block diagram of a GPC 208 included in PPU 202 of FIG. 2,according to one embodiment of the present invention. In operation, GPC208 may be configured to execute a large number of threads in parallelto perform graphics, general processing and/or compute operations. Asused herein, a “thread” refers to an instance of a particular programexecuting on a particular set of input data. In some embodiments,single-instruction, multiple-data (SIMD) instruction issue techniquesare used to support parallel execution of a large number of threadswithout providing multiple independent instruction units. In otherembodiments, single-instruction, multiple-thread (SIMT) techniques areused to support parallel execution of a large number of generallysynchronized threads, using a common instruction unit configured toissue instructions to a set of processing engines within GPC 208. Unlikea SIMD execution regime, where all processing engines typically executeidentical instructions, SIMT execution allows different threads to morereadily follow divergent execution paths through a given program.Persons of ordinary skill in the art will understand that a SIMDprocessing regime represents a functional subset of a SIMT processingregime.

Operation of GPC 208 is controlled via a pipeline manager 305 thatdistributes processing tasks received from a work distribution unit (notshown) within task/work unit 207 to one or more streamingmultiprocessors (SMs) 310. Pipeline manager 305 may also be configuredto control a work distribution crossbar 330 by specifying destinationsfor processed data output by SMs 310.

In one embodiment, GPC 208 includes a set of P of SMs 310, where P≧1.Also, each SM 310 includes a set of functional execution units (notshown), such as execution units and load-store units. Processingoperations specific to any of the functional execution units may bepipelined, which enables a new instruction to be issued for executionbefore a previous instruction has completed execution. Any combinationof functional execution units within a given SM 310 may be provided. Invarious embodiments, the functional execution units may be configured tosupport a variety of different operations including integer and floatingpoint arithmetic (e.g., addition and multiplication), comparisonoperations, Boolean operations (AND, OR, XOR), bit-shifting, andcomputation of various algebraic functions (e.g., planar interpolationand trigonometric, exponential, and logarithmic functions, etc.).Advantageously, the same functional execution unit can be configured toperform different operations.

In operation, each SM 310 is configured to process one or more threadgroups. As used herein, a “thread group” or “warp” refers to a group ofthreads concurrently executing the same program on different input data,with one thread of the group being assigned to a different executionunit within an SM 310. A thread group may include fewer threads than thenumber of execution units within the SM 310, in which case some of theexecution may be idle during cycles when that thread group is beingprocessed. A thread group may also include more threads than the numberof execution units within the SM 310, in which case processing may occurover consecutive clock cycles. Since each SM 310 can support up to Gthread groups concurrently, it follows that up to G*P thread groups canbe executing in GPC 208 at any given time.

Additionally, a plurality of related thread groups may be active (indifferent phases of execution) at the same time within an SM 310. Thiscollection of thread groups is referred to herein as a “cooperativethread array” (“CTA”) or “thread array.” The size of a particular CTA isequal to p*k, where k is the number of concurrently executing threads ina thread group, which is typically an integer multiple of the number ofexecution units within the SM 310, and p is the number of thread groupssimultaneously active within the SM 310.

Although not shown in FIG. 3 each SM 310 contains a level one (L1) cacheor uses space in a corresponding L1 cache outside of the SM 310 tosupport, among other things, load and store operations performed by theexecution units. Each SM 310 also has access to level two (L2) caches(not shown) that are shared among all GPCs 208 in PPU 202. The L2 cachesmay be used to transfer data between threads. Finally, SMs 310 also haveaccess to off-chip “global” memory, which may include PP memory 204and/or system memory 104. It is to be understood that any memoryexternal to PPU 202 may be used as global memory. Additionally, as shownin FIG. 3, a level one-point-five (L1.5) cache 335 may be includedwithin GPC 208 and configured to receive and hold data requested frommemory via memory interface 214 by SM 310. Such data may include,without limitation, instructions, uniform data, and constant data. Inembodiments having multiple SMs 310 within GPC 208, the SMs 310 maybeneficially share common instructions and data cached in L1.5 cache335.

Each GPC 208 may have an associated memory management unit (MMU) 320that is configured to map virtual addresses into physical addresses. Invarious embodiments, MMU 320 may reside either within GPC 208 or withinthe memory interface 214. The MMU 320 includes a set of page tableentries (PTEs) used to map a virtual address to a physical address of atile or memory page and optionally a cache line index. The MMU 320 mayinclude address translation lookaside buffers (TLB) or caches that mayreside within SMs 310, within one or more L1 caches, or within GPC 208.

In graphics and compute applications, GPC 208 may be configured suchthat each SM 310 is coupled to a texture unit 315 for performing texturemapping operations, such as determining texture sample positions,reading texture data, and filtering texture data.

In operation, each SM 310 transmits a processed task to workdistribution crossbar 330 in order to provide the processed task toanother GPC 208 for further processing or to store the processed task inan L2 cache (not shown), parallel processing memory 204, or systemmemory 104 via crossbar unit 210. In addition, a pre-raster operations(preROP) unit 325 is configured to receive data from SM 310, direct datato one or more raster operations (ROP) units within partition units 215,perform optimizations for color blending, organize pixel color data, andperform address translations.

It will be appreciated that the core architecture described herein isillustrative and that variations and modifications are possible. Amongother things, any number of processing units, such as SMs 310, textureunits 315, or preROP units 325, may be included within GPC 208. Further,as described above in conjunction with FIG. 2, PPU 202 may include anynumber of GPCs 208 that are configured to be functionally similar to oneanother so that execution behavior does not depend on which GPC 208receives a particular processing task. Further, each GPC 208 operatesindependently of the other GPCs 208 in PPU 202 to execute tasks for oneor more application programs. In view of the foregoing, persons ofordinary skill in the art will appreciate that the architecturedescribed in FIGS. 1-3 in no way limits the scope of the presentinvention.

Performing Object Detection Operations

Again, the software application 125 configures the PPU 202 to execute alarge number of threads in parallel to perform graphics, generalprocessing and/or compute operations. In particular, the PPU 202 isconfigured to operations as part of detecting instances of an object orclass of object (e.g., faces, pets, logos, pedestrians, etc.) atmultiple scales in images. In some embodiments, the CPU 102 and the PPU202 may be configured to collaboratively perform object detection in twogeneral steps—a training step and an execution step. Advantageously, theCPU 102 and the PPU 202 are configured to implement object detectionusing multi-block local binary pattern (MB-LBP) features thatefficiently capture discriminatory image structures in conjunction witha random forest classifier (RF) that is amenable the parallelarchitecture of the PPU 202.

In one embodiment, the CPU 102 performs the training step in twosequential phases. First, in an initial phase, the CPU 102 trains the RFclassifier to distinguish between images that include objects (alsoreferred to herein as objects of interest) and non-objects (alsoreferred to herein as objects not of interest) based on an initial poolof MB-LBP features. Notably, the CPU 102 randomly selects the initialpool of MB-LBP features from a relatively large set of possible MB-LBPfeatures. The CPU 102 then analyzes the trained RF classifier tojudiciously select a reduced pool of MB-LPB features that optimallydiscriminate between the objects and the non-objects. Subsequently, in areduced phase, the CPU 102 resets the RF classifier to an initial stateand retrains the RF classifier based on the reduced pool of MB-LBPfeatures. Since the CPU 120 selects the reduced pool of MB-LBP featuresbased on the demonstrated discriminatory capability of the MB-LBPfeatures, the effectiveness of the retrained RF classifier is increasedcompared to the initially trained RF classifier. As a result, the depthand breadth of the RF classifier may be reduced compared toconventionally-trained classifiers—without sacrificing accuracy. Thus,the time and memory required to perform object detection using the RFclassifier may be reduced while the accuracy of the results isincreased.

After the CPU 102 trains the RF classifier, the CPU 102 and the PPU 202collaborate to perform the execution step of object detection. Notably,the CPU 102 applies the RF classifier to multiple scaled versions of aninput image, thereby performing object detection at multiple scales inthe input image. The PPU 202 subdivides each scaled image into groups ofpixels and copies the image data associated with each group of pixels,known as a “memory patch,” from the system memory 104 to the PP memory204. For each group of pixels, the PPU 202 associates a different threadwith each pixel included in the group of pixels and then causes thethreads to concurrently process the group of pixels. More specifically,each thread operates on image data included in the memory patch,computes the MB-LBP feature of the associated pixel, and applies the RFclassifier to the associated pixel to determine whether the pixel isassociated with the object of interest. Advantageously, the PPU 202applies the same number and type of operations to each pixel, therebyexploiting the SIMD capabilities of the PPU 202. By contrast, aprocessing unit that performs object detection using a conventionalcascaded classifier typically applies a different number and/or type ofoperations to each pixel and, consequently, does not fully leverage theparallel processing capabilities of the processing unit.

FIG. 4 is a conceptual diagram illustrating how a multi-block localbinary pattern (MB-LBP) 410 feature may be computed, according to oneembodiment of the present invention. Each MB-MBP feature 410 isassociated with a particular pixel and, together, a set of MB-LBPfeatures 410 encode local image textures—effectively capturing a diverserange of image structures across a wide variety of scales and location.Advantageously, the MB-LPB features 410 are robust to local illuminationvariations, encode signal differences in all direction, and are easy tocompute. By contrast, Haar features (an alternative featurerepresentation) are less robust to illumination conditions and do notencode differences in the signal in all directions.

As part of the training step, the PPU 202 computes the MB-LBP features410 associated with images of the objects of interest and images ofobjects not of interest. Subsequently, as part of the execution step,the PPU 202 computes the MB-LBP features 410 associated with inputimages and re-sized version of the input images. In some embodiments,the PPU 202 computes the MB-LBP 410 features across multiple sequentialimage frames (e.g., video). In alternate embodiments, the CPU 102 may beconfigured to compute the MB-LBP features 410 of the images of theobjects of interest and images not of interest instead of or inconjunction with the PPU 202. In other embodiments, the CPU 102 may beconfigured to compute the MB-LBP features 410 of the input images andre-sized version of the input images instead of or in conjunction withthe PPU 202. In operation, prior to computing the MB-LBP feature 410,the CPU 102 creates a greyscale of the image and calculates anassociated data structure known as an “integral image.” The integralimage enables the PPU 202 to efficiently compute the average of thegreyscale values included in a fixed sized block of pixels.

The PPU 202 computes the MB-LBP feature 410 of a particular pixel basedon the greyscale values of the pixels included in a proximally-locatedgroup of pixels known as a pixel window 408. As shown, the pixel window408 is a two-dimensional array of fifty-four pixels, arranged in sixrows and nine columns. Each pixel window 408 includes nine fixed-sizedblocks 402 of pixels arranged in three rows and three columns. Asexplicitly illustrated for the upper-left block 402(0), each block 402is a two-dimensional array of six pixels, arranged in two rows and threecolumns. In alternate embodiments, the pixel window 408 and the blocks402 included in the pixel window 408 may be of any dimension and aspectratio. Further, for a particular pixel, the corresponding pixel window408 may be determined in any technically feasible fashion. For instance,for a pixel at a location (4,3), the pixel window 408 may include pixelsincluded in the rectangular region bounded by the location (0,0) and thelocation (9, 6). Alternatively, the pixel window 408 may include pixelsin the rectangular region bounded by the location (4, 3) and thelocation (13, 9).

In operation, the PPU 202 computes the MB-LBP feature 410 of the pixelin two steps. In the first step, the PPU 202 computes the averagegreyscale value 404 of each of the nine blocks 402. As shown, the block402(0) includes the greyscale values 6, 8, 8, 6, 6, and 8. Consequently,the PPU 202 computes a value of seven for the average greyscale value404(0) of the block 402(0.) As also shown, the PPU 202 computes a valueof nine for the average greyscale value 404(8) of a central block402(8), a value of nineteen for the average greyscale value 404(4) ofthe lower-right block 402(4), and values of eight, twelve, eleven,twenty, six, and eight for the average greyscale values 404 of theremaining blocks 402.

In the second step—thresholding 415—the PPU 202 generate the values thatrepresent the MB-LBP feature 410. In operation, the PPU 202 subtractsthe average greyscale value of the central block 402 from each of theaverage grayscale values 404 of the eight blocks 402 that surround thecentral block 404. The PPU 202 then encodes the signs of thesedifferences. If the sign of the difference associated with a particularblock 402 is strictly negative, then the PPU 202 sets the sign valueassociated with the particular block 402 to binary ‘0.’ By contrast, ifthe sign of the difference associated with a particular block 402 is notstrictly negative, then the PPU 202 sets the sign value associated withthe particular block 402 to binary ‘0.’ As shown, the PPU 202 computeseight sign values 0, 0, 1, 1, 1, 1, 0, and 0. Subsequently, the PPU 202performs a concatenation operation on the eight sign values to computethe MB-LBP feature 410 as “00111100.”

The MB-LBP feature 410 may be visually expressed—describing 425. Thegrey rectangle represents the central block 402, the black rectanglesrepresent the blocks 402 associated with sign values of ‘0,’ and theunfilled rectangles represent the blocks 402 associated with sign valuesof ‘1.’

FIG. 5 is a conceptual diagram illustrating how a random forest (RF)classifier 510 may be trained, according to one embodiment of thepresent invention. As persons skilled in the art will recognize, thequantity of operations required to perform the training phase of objectdetection is substantially greater than the quantity of operationsrequired to perform the execution phase of object detection. Further,the vast majority of the operations required to perform the executionphase of object detection are decision operations that discriminatebetween objects and non-objects. Advantageously, the CPU 102 trains theRF classifier 510 in two steps designed to both reduce the number of thedecision operations required to accurately discriminate between objectsand non-objects and improve the detection accuracy compared toconventional classifiers.

As shown, the RF classifier 510 includes one or moreidentically-structured, independent decision trees 520. Notably, the CPU102 initially configures the RF classifier 510 to include a set of Findependent decision trees 520, where F≦1. Subsequently, the CPU 102resets the RF classifier 410 to include a set of G independent decisiontrees 520, where F≧G≧1. For instance, the CPU 102 may initiallyconfigure the RF classifier 510 to include 1024 decision trees 520 and,subsequently, the CPU 102 may reset the RF classifier 510 to include 32decision trees 520. In operation, the CPU 102 may reduce the number ofthe decision trees 520 included in the RF classifier 410 in conjunctionwith optimizing the subset of MB-LBP features 410 used to train the RFclassifier 510. Notably, each of the decision trees 520 is of an equaldepth 550 and includes identically structured branches. In alternateembodiments, the CPU 102 may alter the equal depth 550 in conjunctionwith resetting the RF classifier 510. However, across a particulartrained RF classifier 510, the decision trees 520 are of the equal depth550.

As shown, the CPU 102 initially creates the RF classifier 510 and trainsthe RF classifier 510 based on an initial MB-LBP feature pool 505.Notably, the initial MB-LBP feature pool 505 is a randomly-selectedsubset of the set of all possible MB-LBP features 410. In general, theset of all possible MB-LBP features 410 is substantially larger than therandomly selected MB-LBP feature pool 505. The CPU 102 may generate theinitial MB-LBP feature pool 505 in any technically feasible fashion. Forinstance, as persons skilled in the art will understand, the CPU 102 maygenerate the initial MB-LBP feature pool 505 via bagging.

Subsequently, for each decision tree 520 included in the RF classifier510, the CPU 102 selects a random subset of features from the initialMB-LBP feature pool 505. The CPU 102 then trains each decision tree 520on a set of “positive” images that include objects of interest and a setof “negative” images that do not include objects of interest. At eachsplit in the decision tree 520, the CPU 102 randomly selects a subset ofthe MB-LBP feature 410 included in the decision tree 520. The CPU 102then analyzes this subset of the initial MB-LBP feature pool 505 todetermine the MB-LBP feature 410 that most accurately discriminatesbetween the positive images and the negative images. The CPU 102 selectsthis locally most discriminatory MB-LBP feature 410 for the split.

After the CPU 102 trains all of the decision trees 520(0) through520(F−1), the CPU 102 analyzes the initially trained RF classifier 510to compute the frequency with which each of the MB-LBP features 410appears as a split in the decision trees 520. In general, the CPU 102assesses the discriminatory capability of a particular MB-LBP feature410 based on this frequency. For instance, in some embodiments, the CPU102 may be configured to determine that any MB-LBP feature 410 thatappears as a split less than six times in the 1024 decision trees 520has no valuable discriminatory capability. In general, the CPU 102selects the subset of the most discriminatory MB-LBP features 410 as areduced MB-LBP feature pool 565. For instance, in some embodiments, theCPU 102 selects all of the MB-LBP features 410 that appear as a splitmore than eight times in the decision trees 520.

The CPU 102 then resets the RF classifier 510 to an untrained state. Insome embodiments, the CPU 102 also reduces the number of decision trees520 included in the RF classifier 510. Subsequently, for each of thedecision trees 520(0) through 520(F−1), the CPU 102 selects a randomsubset of features from the reduced MB-LBP feature pool 565. The CPU 102retrains each decision tree 520 on the set of positive images and theset of negative images. At each split in the decision tree 520, the CPU102 randomly selects a subset of the MB-LBP features 410 included in thedecision tree 520. The CPU 102 then analyzes this subset of the reducedMB-LBP feature pool 565 to determine the MB-LBP feature 410 that mostaccurately discriminates between the positive images and the negativeimages. The CPU 102 selects this locally most discriminatory MB-LBPfeature 410 for the split.

Advantageously, this two-pass training technique deterministicallyimproves the performance of the RF classifier 510. In particular, theaccuracy with which the RF classifier 510 detects objects is improvedcompared to comparably sized conventionally-trained classifiers.Further, the software application 125 may tune the equal depth 510 ofthe RF classifier 510 and/or the number of the decision trees 520included in the RF classifier 510 based on the time and accuracyconstraints of the software application 125. In alternate embodiments,the PPU 202 may be configured to perform one or more operations includedin the training step.

FIG. 6 is a conceptual diagram of an image pyramid 600, according to oneembodiment of the present invention. To detect objects in an input imageat a variety of different scales, the CPU 102 performs resizingoperations on the input image to generate the image pyramid 600.Subsequently, the CPU 102 and the PPU 202 collaborate to perform objectdetection across the image pyramid 600.

As shown, the image pyramid 600 includes a set of N scaled images 620,where N≧1. Each of the scaled images 620 represents the input image at adifferent magnification. For example, a first scaled image 620(0) mayrepresent an upsized version of the input image, a second scaled image620(1) may represent the original image, and a third scaled image 620(2)may represent a downsized version of the input image.

For each of the scaled images 620, the CPU 102 generates a greyscale ofthe image and computes the integral image associated with the scaledimage 620. As previously noted herein, the CPU 102 then divides thescaled image 620 into memory patches 650. Each memory patch 650 isassociated with a group of pixels. Further, each pixel is associatedwith a particular pixel window 408. The size and aspect ratio of thememory patch 650 and the pixel window 408 may be determined in anytechnically feasible fashion. For instance, the CPU 102 may determinethe size and aspect ratio of the pixel window 408 based on the number ofthreads in the warp. Further, the CPU 102 may determine the size andaspect ratio of the memory patch based on the size and aspect ratio ofthe pixel window 408 and the architecture of the PPU 202.

As part of the execution step of object detection, the PPU 202 copiesthe trained RF classifier 510 from the system memory 104 to the PPmemory 204. Subsequently, the PPU 202 selects a group of pixels andassigns a different thread to each pixel included in the group ofpixels. The PPU 202 selects a particular scaled image 620 and copies thememory patch 650 associated with both the selected group of pixels andthe selected scaled image 620 from the system memory 104 to the PPmemory 204. The PPU 202 then causes the threads to concurrently applythe RF classifier 510 to the pixels included in the group of pixels. ThePPU 202 may store and apply the RF classifier 510 in any technicallyfeasible fashion. For instance, the PPU 202 may store the RF classifier510 in tabular form in breadth-first search order and, as the PPU 202processes the group of pixels, the different threads access variablelocations of the table. In alternate embodiments, the PPU 202 may assignany number of threads to process any number of pixels and may notprocess all of the pixels included in all of the scaled images 620. Forexample, in some embodiments, the PPU 202 is configured to process onlyalternate pixels included in larger scaled images 620.

First, each thread computes the required MB-LBP features 410 of theassigned pixel based on the subset of data included in memory patch 650that corresponds to the pixel window 408 associated with the assignedpixel. Subsequently, each thread sequentially applies each decision tree520 included in the RF classifier 510 to the assigned pixel. Finally,each thread generates an object confidence value that represents thelikelihood of the presence of the object at the location of the assignedpixel based on the individual determinations of each of the decisiontrees 520.

As shown, in one embodiment, each pixel window 408 includes 480 pixelsarranged in 20 columns and 24 rows. Consequently, as previouslydisclosed herein, the MB-LBP feature 410 associated with each pixel iscomputed based on a group of 480 pixels. Further, each memory patch 650includes the image data for 256 pixel windows 408 arranged in 32 columnsand 8 rows. Thus, each memory patch 650 includes image data for 1664pixels arranged in 52 columns and 32 rows. The image data included in aparticular memory patch 650 enables the PPU 202 to determine the MB-LBPfeatures 410 associated with a group of 256 pixels arranged in 32columns and 8 rows for a particular scaled image 620. In operation, eachthread included in an “8 warps of 32 threads” 655 processes one of the256 pixel windows 408 associated with each memory patch 650. As shown,together, the 8 warps of 32 threads 655 apply the RF classifier 510 to256 pixels, thereby processing the upper-left memory patch 650 includedin the scaled image 620(0).

The PPU 202 continues to process groups of pixels and scaled images 620until the PPU 202 has computed an object confidence value for each pixeland each scaled image 620 included in the image pyramid 600. The CPU 102then completes the execution step of the object detection process. Inoperation, the CPU 102 determines detections based on the per-pixel,per-scaled image object confidence values computed by the PPU 202. Ifthe CPU 102 determines that an object confidence value is greater than apredetermined threshold, then the CPU considers the object confidencevalue to represent a “detection” associated with the pixel. The CPU 102then collapses multiple overlapping detections within and between thescaled images 620 via non-maxima suppression to determine the finaldetections. For each final detection, the CPU 102 computes an overallobject confidence value based on the weighted sum of the average of theper-pixel, per-scaled image object confidence values of overlappingdetections and the number of overlapping detections. Finally, the CPU102 performs further processing such as object definition, objectclassification, tracking, etc.

In alternate embodiments, any processing unit or combination ofprocessing units may perform any of the operations included in theobject detection process. For example, in some embodiments, the CPU 102processes the smallest of the scaled images 620 included in the imagepyramid 600. In other embodiments, the CPU 102 copies unprocessed memorypatches 650 to the PP memory 204 as the PPU 202 is applying the RFclassifier 510 to one or more memory patches 650. In alternateembodiments, any processing unit may determine detections and thecollapse multiple detections in any technically feasible fashion.

FIGS. 7A-7B set forth a flow diagram of method steps for training arandom forest classifier, according to one embodiment of the presentinvention. Although the method steps are described with reference to thesystems of FIGS. 1-6, persons skilled in the art will understand thatany system configured to implement the method steps, in any order, fallswithin the scope of the present invention.

As shown, a method 700 begins at step 702, where the CPU 102 randomlyselects an initial MB-LBP feature pool 505 from the set of all possibleMB-LBP features 410. At step 704, the CPU 102 initializes the RFclassifier 510 to an untrained state. The CPU 102 then selects the firstdecision tree 520 included in the RF classifier 510. At step 706, theCPU 102 initializes the selected decision tree 520 to include a randomsubset of MB-LBP features 410 from the initial MB-LBP feature pool 505.

At step 708, the CPU 102 trains the selected decision tree 520 on a setof positive images that include objects of interest and a set ofnegative images that do not include objects of interest. At each splitin the selected decision tree 520, the CPU 102 randomly selects a subsetof the MB-LBP feature 410 included in the decision tree 520. The CPU 102then analyzes this subset of the initial MB-LBP feature pool 505 todetermine the MB-LBP feature 410 that most accurately discriminatesbetween the positive images and the negative images. The CPU 102 selectsthis locally most discriminatory MB-LBP feature 410 for the split in theselected decision tree 520. If, at step 710, the CPU 102 determines thatthe selected decision tree 520 is not the last decision tree 520included in the RF classifier 510, then the method 700 proceeds to step712. At step 712, the CPU 102 selects the next decision tree 520included in the RF classifier 510, and the method 700 returns to step706. The CPU 102 repeatedly cycles through steps 706 through 712,training each decision tree 520 until the CPU 102 has finished trainingall of the decision trees 520 included in the RF classifier 510.

If, at step 710, the CPU 102 determines that the selected decision tree520 is the last decision tree 520 included in the RF classifier 510,then the method 700 proceeds to step 714. At step 714, the CPU 102analyzes the RF classifier 510 and selects the subset of MB-LBP features410 that appear most often as a split in the decision trees 520.Together, these selected MB-LBP features 410 form the reduced MB-LBPfeature pool 565. At step 716, the CPU 102 resets the RF classifier 510to an untrained state. In some embodiments, the CPU 102 also reduces thenumber of decision trees 520 included in the RF classifier 510.Subsequently, the CPU 102 selects the first decision tree 520 includedin the RF classifier 510. At step 718, the CPU 102 initializes theselected decision tree 520 to include a random subset of the MB-LBPfeatures 410 from the reduced MB-LBP feature pool 565.

At step 720, the CPU 102 retrains the selected decision tree 520 on thepositive images and the negative images. At each split in the selecteddecision tree 520, the CPU 102 randomly selects a subset of the MB-LBPfeatures 410 included in the decision tree 520. The CPU 102 thenanalyzes this subset of the reduced MB-LBP feature pool 565 to determinethe MB-LBP feature 410 that most accurately discriminates between thepositive images and the negative images. The CPU 102 selects thislocally most discriminatory MB-LBP feature 410 for the split in theselected decision tree 520. If, at step 722, the CPU 102 determines thatthe selected decision tree 520 is not the last decision tree 520included in the RF classifier 510, then the method 700 proceeds to step724. At step 724, the CPU 102 selects the next decision tree 520included in the RF classifier 510, and the method 700 returns to step718. The CPU 102 repeatedly cycles through steps 718 through 724,retraining each decision tree 520 until the CPU 102 has finishedretraining all of the decision trees 520 included in the RF classifier510. If, at step 722, the CPU 102 determines that the selected decisiontree 520 is the last decision tree 520 included in the RF classifier510, then the method 700 terminates. In alternate embodiments, steps 714through 724 may be repeated any number of times—improving the accuracyof the RF classifier 510 with each repetition.

FIGS. 8A-8B set forth a flow diagram of method steps for performingobject detection via a parallel processing architecture, according toone embodiment of the present invention. Although the method steps aredescribed with reference to the systems of FIGS. 1-6, persons skilled inthe art will understand that any system configured to implement themethod steps, in any order, falls within the scope of the presentinvention.

As shown, a method 800 begins at step 801, where the CPU 102 receives aninput image and generates the associated image pyramid 600. At step 802,the PPU 202 selects a first group of pixels and the first scaled image620 included in the image pyramid 600. At step 804, the PPU 202 assignsa different thread to process each of the pixels included in theselected group of pixels. At step 806, the PPU 202 selects the memorypatch 650 included in the selected scaled image 620 that includes thepixel windows 408 associated with the selected group of pixels. At step808, the PPU 202 copies the memory patch 650 from the system memory 104to the PP memory 204.

At step 810, the PPU 202 causes the threads assigned to the selectedgroup of pixels to concurrently compute the required per-pixel MB-LBPfeatures 410 associated with the assigned pixels based on theappropriate pixel windows 408. At step 812 the PPU 202 causes thethreads assigned to the selected group of pixels to concurrently applythe RF classifier 520 to the assigned pixels. As part of this step, eachthread sequentially applies each decision tree 520 included in the RFclassifier 510 to the assigned pixel. Each thread then generates anobject confidence value (specific to the assigned pixel and the selectedscaled image 620) that represents the likelihood of the presence of theobject at the location of the assigned pixel based on the individualdeterminations of each of the decision trees 520.

At step 814, if the PPU 202 determines that the selected scaled image620 is not the last scaled image 620 included in the image pyramid 600,then the method 800 proceeds to step 816. At step 816, the PPU 202selects the next scaled image 620 included in the image pyramid 600, andthe method 800 returns to step 806. The PPU 202 repeatedly cyclesthrough steps 806 through 816, processing the memory patch 650associated with both the selected group of pixels and the selectedscaled image 620 until the PPU 202 has processed the selected group ofpixels for all of the scaled images 620 included in the image pyramid600.

If, at step 814, the PPU 202 determines that the selected scaled image620 is the last scaled image 620 included in the image pyramid 600, thenthe method 800 proceeds to step 818. At step 816, if the PPU 202determines that the selected group of pixels is not the last group ofpixels included in the image pyramid 600, then the method 800 proceedsto step 820. At step 820, the PPU 202 selects the next group of pixelsincluded in the image pyramid 600, and the method 800 returns to step804. The PPU 202 repeatedly cycles through steps 804 through 818,processing each group of pixels across all of the scaled images 620until the PPU 202 has processed all of the pixels across all of thescaled images 620 included in the image pyramid 600.

If, at step 818, the PPU 202 determines that the selected group ofpixels is the last group of pixels included in the image pyramid 600,then the method 800 proceeds to step 822. At step 822, the CPU 102determines detections based on the per-pixel, per-scaled image objectconfidence values computed by the PPU 202. The CPU 102 then collapsesmultiple overlapping detections via non-maxima suppression to determinethe final detections. At step 824, for each final detection, the CPU 102computes an overall object confidence value based on the weighted sum ofthe average of the per-pixel, per-scaled image object confidence valuesof overlapping detections and the number of overlapping detections.

In sum, in the training step of an object detection algorithm, acomputer system trains a random forest (RF) classifier in two phases—aninitial feature phase and a reduced feature phase. The RF classifierincludes multiple independent decision trees, each of which isstructurally identical. In the initial feature phase, the computersystem randomly selects an initial pool of multi-block local binarypattern (MB-LBP) features from the set of all possible MB-LBP featuresthat describe the object. The computer system trains each of thedecision trees independently on a random subset of the initial pool ofMB-LPB features, selecting the most discriminatory MB-LBP feature foreach split in the tree.

After initially training the RF classifier, the computer system analyzesthe decision trees included in the RF classifier to determine the MB-LBPfeatures that are most often selected for splits. Together, these MB-LBPfeatures form a reduced MB-LBP feature pool. In the reduced featurephase, the computer system resets the RF classifier to an initial stateand retrains each of the decision trees independently on a featuresubset randomly selected from the reduced MB-LBP feature pool. Again,the computer system selects the most discriminatory MB-LBP features foreach split in the tree. The RF classifier produced by this two phasetraining process includes multiple independent decision trees of equaldepth, independently trained based on a deterministically optimizedsubset of MB-LBP features.

Subsequently, in the execution step of the object detection algorithm, aCPU generates an image pyramid of scaled images based on an input image.A GPU within the computer system concurrently processes multiple imagepixels included in each of the scaled images. In one instance, the GPUassigns a different thread to process each pixel by applying the RFclassifier. Each of these threads computes the MB-LBP featuresassociated with a pixel window surrounding the pixel location,sequentially applies each decision tree included in the RF classifier tothe MB-LBP features, and generates a per-pixel, per-scaled image objectconfidence value. The per-pixel, per-scaled image object confidencevalue represents the likelihood of the presence of the object at thepixel location. If the CPU determines that an object confidence value isgreater than a predetermined threshold, then the CPU considers theobject confidence value to represent a “detection” associated with thepixel. The CPU collapses multiple overlapping detections within andbetween scaled images via non-maxima suppression to determine the finaldetections. For each final detection, the CPU then computes an overallobject confidence value based on the weighted sum of the average of theper-pixel, per-scaled image object confidence values of overlappingdetections and the number of overlapping detections.

Advantageously, performing object detection using a RF classifier thatincludes structurally identical decision trees leverages the parallelarchitecture of the GPU. Notably, applying the RF classifier to eachpixel entails performing equivalent mathematical operations on eachpixel. Consequently, performing object detection using a RF classifierexploits the ability of the GPU to optimally and concurrently performthe same instruction on multiple pixels. In addition, by employing atwo-phase training procedure to optimize the MB-LBP features used totrain the RF classifier, the accuracy of the RF classifier is improvedcompared to typical conventionally trained classifiers. Thus, thetechniques described herein enable more efficient and accurate objectdetection than conventional object detection approaches.

One embodiment of the invention may be implemented as a program productfor use with a computer system. The program(s) of the program productdefine functions of the embodiments (including the methods describedherein) and can be contained on a variety of computer-readable storagemedia. Illustrative computer-readable storage media include, but are notlimited to: (i) non-writable storage media (e.g., read-only memorydevices within a computer such as compact disc read only memory (CD-ROM)disks readable by a CD-ROM drive, flash memory, read only memory (ROM)chips or any type of solid-state non-volatile semiconductor memory) onwhich information is permanently stored; and (ii) writable storage media(e.g., floppy disks within a diskette drive or hard-disk drive or anytype of solid-state random-access semiconductor memory) on whichalterable information is stored.

The invention has been described above with reference to specificembodiments. Persons of ordinary skill in the art, however, willunderstand that various modifications and changes may be made theretowithout departing from the broader spirit and scope of the invention asset forth in the appended claims. The foregoing description and drawingsare, accordingly, to be regarded in an illustrative rather than arestrictive sense.

Therefore, the scope of embodiments of the present invention is setforth in the claims that follow.

The invention claimed is:
 1. A computer-implemented method for traininga random forest classifier for object detection, the method comprising:selecting an initial set of features; training at least one decisiontree included in the random forest classifier based on the initial setof features; determining a reduced set of features based on the randomforest classifier, wherein the features included in the reduced set offeatures comprise a subset of the features included in the initial setof features that distinguish between objects of interest and objects notof interest more accurately than other features included in the initialset of features; resetting the at least one decision tree included inthe random forest classifier to an untrained state; and retraining theat least one decision tree included in the random forest classifier fromthe untrained state based on the reduced set of features.
 2. The methodof claim 1, wherein the random forest classifier comprises a pluralityof decision trees that are structurally identical, and each decisiontree includes a plurality of splits.
 3. The method of claim 2, whereintraining the random forest classifier based on the initial set offeatures comprises: selecting a first subset of features, wherein thefeatures included in the first subset of features comprise a randomsubset of the initial set of features; training a first decision treeincluded in the plurality of decision trees based on the first subset offeatures; determining a second subset of features, wherein the featuresincluded in the second subset of features comprise a random subset ofthe initial set of features; training a second decision tree included inthe plurality of decision trees based on the second subset of features.4. The method of claim 3, wherein training the first decision treecomprises: determining that a first feature included in the first subsetof features more accurately distinguishes between one or more objects ofinterest and one or more objects not of interest than any other featureincluded in the first subset of features; and associating the firstfeature with a first split included in the plurality of splits includedin the first decision tree.
 5. The method of claim 2, whereindetermining the reduced set of features comprises: calculating a firstnumber of times a first feature included in the initial set of featuresis associated with the plurality of splits included in each decisiontree; calculating a second number of times a second feature included inthe initial set of features is associated with the plurality of splitsincluded in each decision tree; determining that the first number oftimes is greater than a threshold, and adding the first feature to thereduced set of features; and determining that the second number of timesis not greater than the threshold, and excluding the second feature fromthe reduced set of features.
 6. The method of claim 2, wherein trainingthe random forest classifier based on the reduced set of featurescomprises: selecting a first subset of features, wherein the featuresincluded in the first subset of features comprise a random subset of thereduced set of features; training a first decision tree included in theplurality of decision trees based on the first subset of features;selecting a second subset of features, wherein the features included inthe second subset of features comprise a random subset of the reducedset of features; and training a second decision tree included in theplurality of decision trees based on the second subset of features. 7.The method of claim 2, wherein at least one of a depth across each ofthe decision trees included in the random forest classifier and a numberof decision trees included in the random forest classifier are selectedbased on a desired accuracy.
 8. The method of claim 1, wherein thefeatures comprise multi-block local binary pattern (MB-LBP) features. 9.The method of claim 8, wherein the plurality of features includesmultiple instances of a first MB-LBP feature.
 10. The method of claim 1,wherein resetting the random forest classifier to the untrained statecomprises reducing a number of decision trees included in the randomforest classifier.
 11. A non-transitory computer-readable storage mediumincluding instructions that, when executed by a processor, cause theprocessor to train a random forest classifier for object detection byperforming the steps of: selecting an initial set of features; trainingat least one decision tree included in the random forest classifierbased on the initial set of features; determining a reduced set offeatures based on the random forest classifier, wherein the featuresincluded in the reduced set of features comprise a subset of thefeatures included in the initial set of features that distinguishbetween objects of interest and objects not of interest more accuratelythan other features included in the initial set of features; resettingthe at least one decision tree included in the random forest classifierto an untrained state; and retraining the at least one decision treeincluded in the random forest classifier from the untrained state basedon the reduced set of features.
 12. The non-transitory computer-readablestorage medium of claim 11, wherein the random forest classifiercomprises a plurality of decision trees that are structurally identical,and each decision tree includes a plurality of splits.
 13. Thenon-transitory computer-readable storage medium of claim 12, whereintraining the random forest classifier based on the initial set offeatures comprises: selecting a first subset of features, wherein thefeatures included in the first subset of features comprise a randomsubset of the initial set of features; training a first decision treeincluded in the plurality of decision trees based on the first subset offeatures; determining a second subset of features, wherein the featuresincluded in the second subset of features comprise a random subset ofthe initial set of features; training a second decision tree included inthe plurality of decision trees based on the second subset of features.14. The non-transitory computer-readable storage medium of claim 13,wherein training the first decision tree comprises: determining that afirst feature included in the first subset of features more accuratelydistinguishes between one or more objects of interest and one or moreobjects not of interest than any other feature included in the firstsubset of features; and associating the first feature with a first splitincluded in the plurality of splits included in the first decision tree.15. The non-transitory computer-readable storage medium of claim 12,wherein determining the reduced set of features comprises: calculating afirst number of times a first feature included in the initial set offeatures is associated with the plurality of splits included in eachdecision tree; calculating a second number of times a second featureincluded in the initial set of features is associated with the pluralityof splits included in each decision tree; determining that the firstnumber of times is greater than a threshold, and adding the firstfeature to the reduced set of features; and determining that the secondnumber of times is not greater than the threshold, and excluding thesecond feature from the reduced set of features.
 16. The non-transitorycomputer-readable storage medium of claim 12, wherein training therandom forest classifier based on the reduced set of features comprises:selecting a first subset of features, wherein the features included inthe first subset of features comprise a random subset of the reduced setof features; training a first decision tree included in the plurality ofdecision trees based on the first subset of features; selecting a secondsubset of features, wherein the features included in the second subsetof features comprise a random subset of the reduced set of features; andtraining a second decision tree included in the plurality of decisiontrees based on the second subset of features.
 17. The non-transitorycomputer-readable storage medium of claim 12, wherein at least one of adepth across each of the decision trees included in the random forestclassifier and a number of decision trees included in the random forestclassifier are selected based on a desired accuracy.
 18. Thenon-transitory computer-readable storage medium of claim 11, wherein thefeatures comprise multi-block local binary pattern (MB-LBP) features.19. The non-transitory computer-readable storage medium of claim 18,wherein the plurality of features includes multiple instances of a firstMB-LBP feature.
 20. A computing device configured to train random forestclassifiers for object detection, the system comprising: a memory thatincludes a random forest classifier that includes a plurality ofdecision trees that are structurally identical; and a processing unitcoupled to the memory and configured to: select an initial set offeatures; train at least one decision tree included in the random forestclassifier based on the initial set of features; determine a reduced setof features based on the random forest classifier, wherein the featuresincluded in the reduced set of features comprise a subset of thefeatures included in the initial set of features that distinguishbetween objects of interest and objects not of interest more accuratelythan other features included in the initial set of features; reset theat least one decision tree included in the random forest classifier toan untrained state; and retrain the at least one decision tree includedin the random forest classifier from the untrained state based on thereduced set of features.
 21. The computing device of claim 20, whereinthe features comprise multi-block local binary pattern (MB-LBP)features.